package com.example.game_level;

import org.andengine.entity.sprite.Sprite;
import org.andengine.entity.text.Text;
import org.andengine.opengl.font.Font;
import org.andengine.opengl.texture.region.TextureRegion;

public class Swarchakra extends Sprite {
	
	public Swarchakra(TextureRegion pTextureRegion, Font pFont, String pText, float pRed, float pGreen, float pBlue, float pAlpha) {
        super(0, 0, pTextureRegion, StartActivity.getSharedInstance().getVertexBufferObjectManager());
        StartActivity activity;
        activity = StartActivity.getSharedInstance();
        Text buttonText = new Text(0, 0, activity.numFont, pText+activity.str,  StartActivity.getSharedInstance().getVertexBufferObjectManager());
        buttonText.setPosition((this.getX() + this.getWidth() - buttonText.getWidth()) / 2+5, (this.getY() + this.getHeight() - buttonText.getHeight()) / 2+25);
        buttonText.setColor(pRed, pGreen, pBlue);
        this.attachChild(buttonText);
       
        if(activity.level==3||activity.level>3){
        	
             	
        //AA
        Text buttonText4 = new Text(0, 0, activity.numFont, pText+"\u093E"+activity.str,  StartActivity.getSharedInstance().getVertexBufferObjectManager());
        buttonText4.setPosition((this.getX() + this.getWidth() - buttonText.getWidth()) / 2+65, (this.getY() + this.getHeight() - buttonText.getHeight()) / 2-65);
        buttonText4.setColor(1, 1, 1);        
        this.attachChild(buttonText4);
        
        //E
        Text buttonText1 = new Text(0, 0, activity.numFont, "\u093F"+pText,  StartActivity.getSharedInstance().getVertexBufferObjectManager());
        buttonText1.setPosition((this.getX() + this.getWidth() - buttonText.getWidth()) / 2+100, (this.getY() + this.getHeight() - buttonText.getHeight()) / 2-5);
        buttonText1.setColor(1, 1, 1);        
        this.attachChild(buttonText1);
        
        //EE
        Text buttonText2 = new Text(0, 0, activity.numFont, pText+"\u0940",  StartActivity.getSharedInstance().getVertexBufferObjectManager());
        buttonText2.setPosition((this.getX() + this.getWidth() - buttonText.getWidth()) / 2+110, (this.getY() + this.getHeight() - buttonText.getHeight()) / 2+60);
        buttonText2.setColor(1, 1, 1);        
        this.attachChild(buttonText2);
        
        //U
        Text buttonText3 = new Text(0, 0, activity.numFont, pText+"\u0941"+activity.str,  StartActivity.getSharedInstance().getVertexBufferObjectManager());
        buttonText3.setPosition((this.getX() + this.getWidth() - buttonText.getWidth()) / 2+70, (this.getY() + this.getHeight() - buttonText.getHeight()) / 2+120);
        buttonText3.setColor(1, 1, 1);        
        this.attachChild(buttonText3);
        
      //UU
        Text buttonText5 = new Text(0, 0, activity.numFont, pText+"\u0942"+activity.str,  StartActivity.getSharedInstance().getVertexBufferObjectManager());
        buttonText5.setPosition((this.getX() + this.getWidth() - buttonText.getWidth()) / 2, (this.getY() + this.getHeight() - buttonText.getHeight()) / 2+150);
        buttonText5.setColor(1, 1, 1);        
        this.attachChild(buttonText5);
      
        
        
      
        this.setAlpha(pAlpha);
        
        }
        if(activity.level>3){
        	
        	
        	  
            //AY
          	Text buttonText6 = new Text(0, 0, activity.numFont, pText+"\u0947",  StartActivity.getSharedInstance().getVertexBufferObjectManager());
            buttonText6.setPosition((this.getX() + this.getWidth() - buttonText.getWidth()) / 2-70, (this.getY() + this.getHeight() - buttonText.getHeight()) / 2+120);
            buttonText6.setColor(1, 1, 1);        
            this.attachChild(buttonText6);
              
            //AAY
            Text buttonText7 = new Text(0, 0, activity.numFont, pText+"\u0948",  StartActivity.getSharedInstance().getVertexBufferObjectManager());
            buttonText7.setPosition((this.getX() + this.getWidth() - buttonText.getWidth()) / 2-110, (this.getY() + this.getHeight() - buttonText.getHeight()) / 2+60);
            buttonText7.setColor(1, 1, 1);        
            this.attachChild(buttonText7);
              
            //O
            Text buttonText9 = new Text(0, 0, activity.numFont, pText+"\u094B",  StartActivity.getSharedInstance().getVertexBufferObjectManager());
            buttonText9.setPosition((this.getX() + this.getWidth() - buttonText.getWidth()) / 2-120, (this.getY() + this.getHeight() - buttonText.getHeight()) / 2-5);
            buttonText9.setColor(1, 1, 1);        
            this.attachChild(buttonText9);
            
            //OO
            Text buttonText10 = new Text(0, 0, activity.numFont, pText+"\u094C",  StartActivity.getSharedInstance().getVertexBufferObjectManager());
            buttonText10.setPosition((this.getX() + this.getWidth() - buttonText.getWidth()) / 2-70, (this.getY() + this.getHeight() - buttonText.getHeight()) / 2-65);
            buttonText10.setColor(1, 1, 1);        
            this.attachChild(buttonText10);
            
          //HALANT
            Text buttonText11 = new Text(0, 0, activity.numFont, pText+"\u094D"+activity.str,  StartActivity.getSharedInstance().getVertexBufferObjectManager());
            buttonText11.setPosition((this.getX() + this.getWidth() - buttonText.getWidth()) / 2, (this.getY() + this.getHeight() - buttonText.getHeight()) / 2-90);
            buttonText11.setColor(1, 1, 1);        
            this.attachChild(buttonText11);
           
           
            this.setAlpha(pAlpha);
        }
        
}

	


}
